package com.vhall.component.controller.account.facade;

import com.vhall.component.entity.account.vo.AccountVO;
import com.vhall.component.entity.export.dto.AdminExportCommonQueryCondition;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @author longzhen.gong
 * @date 2021/6/9 15:50
 */
@FeignClient(value = "AccountInnerFacade", path = "/v4/inner/account")
public interface AccountInnerFacade {

    /**
     * 查询账户信息
     *
     * @param ids 参数
     * @return 返回值
     */
    @ApiOperation("查询账户信息")
    @GetMapping("/list")
    List<AccountVO> list(@RequestParam("ids") String ids);

    /**
     * 过滤观看账户
     *
     * @param ids 参数
     * @return 返回值
     */
    @ApiOperation("过滤观看账户")
    @PostMapping(value = "/filter-watch-type")
    List<Integer> filterAccountType(@RequestParam("ids") List<Integer> ids);

    /**
     * 针对admin导出用户计算总条数
     *
     * @param userType  用户类型，1=主持人 2=用户
     * @param condition 查询条件
     * @return 总条数
     */
    @PostMapping("/count-user-for-admin-export/{userType}")
    Integer countUserForAdminExport(@PathVariable("userType") Integer userType,
                                    @RequestBody AdminExportCommonQueryCondition condition);

    /**
     * 针对admin导出管理员计算总条数
     *
     * @param condition 查询条件
     * @return 总条数
     */
    @PostMapping("/count-admin-for-admin-export")
    Integer countAdminForAdminExport(@RequestBody AdminExportCommonQueryCondition condition);

}
